package com.winter.Controller;

import com.github.pagehelper.PageInfo;
import com.winter.service.CoursewareSerivce;
import com.winter.util.Result;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("v1/courseware")
public class CoursewareController {

    @Autowired
    private CoursewareSerivce coursewareSerivce;

    @GetMapping
    public Result list(Integer pageSize, Integer pageNumber, String key, String userNo, String userType, String type) {
        PageInfo list = coursewareSerivce.list(pageSize, pageNumber, key, userNo, userType, type);
        return Result.success(list);
    }

}
